﻿using System.Text;

namespace Socium.Domain.Persons
{
	public class PersonName
	{
		readonly string _given;
		readonly string _patronymic;
		readonly string _family;

		public PersonName(string given, string patronymic, string family)
		{
			_given = given;
			_patronymic = patronymic;
			_family = family;
		}

		public override string ToString()
		{
			var string_builder = new StringBuilder();
			string_builder.Append(_family);
			string_builder.Append(' ').Append(_given);

			if (!string.IsNullOrEmpty(_patronymic))
				string_builder.Append(' ').Append(_patronymic);

			return string_builder.ToString();
		}
	}
}
